<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_user_to_multiple_project".
 *
 * @property string $id
 * @property string $user_id 用户id
 * @property string $self_project_id 自己本来的联盟
 * @property string $enter_project_id 用户加入的联盟
 * @property string $role_type 用户角色：教师，学生，社会学习者，企业用户
 * @property int $del_flag
 */
class TBaseUserToMultipleProject extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_user_to_multiple_project';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'user_id'], 'required'],
            [['del_flag'], 'integer'],
            [['id', 'user_id', 'self_project_id', 'enter_project_id'], 'string', 'max' => 36],
            [['role_type'], 'string', 'max' => 255],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'self_project_id' => 'Self Project ID',
            'enter_project_id' => 'Enter Project ID',
            'role_type' => 'Role Type',
            'del_flag' => 'Del Flag',
        ];
    }
}
